package com.isoftstone.studentregistration.service;





import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.isoftstone.studentregistration.pojo.Users;
import com.isoftstone.studentregistration.util.Result;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.catalina.User;
import org.apache.ibatis.annotations.Param;

import java.io.IOException;
import java.util.List;

//业务逻辑接口：处理业务逻辑
public interface UserService {
//   根据手机号查询用户
    Result<Users> queryUserByPhone(String phone);

    //   添加用户
    Result<?> insertUser(Users user);
    //   修改用户
    Result<?> updateUser(Users user);
    //   删除用户
    Result<?> deleteUser(Integer id);
    //   查询所有用户
    Page queryAllUsers(Integer currentPage, Integer pageSize);
//用户登录
    Result<?> login(String phone,String password);

    //根据状态或用户名分页
    PageInfo<Users> queryUsers(Integer status, String username, Integer currentPage, Integer pageSize);

    //
    void importTemplate(HttpServletResponse response) throws IOException;
    //excel文件导出
    void exportExcel(HttpServletResponse response);
    //批量删除
    Result<?> deleteBatch(List<Integer> ids);
//状态更新
Result<Integer> updateStatus(@Param("id") Integer id,
                             @Param("status") String status);
//根据状态或者用户名分页查询


}